<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta content="en" name="language">
	<title>signature</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link media="screen" href="../docutils-api.css" type="text/css" rel="stylesheet">

</head>

<body>

<div class="banner">
<img src="../images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
<span class="title">GraphicsMagick</span>
<form action="http://www.google.com/search">
  <input type="hidden" name="domains" value="www.graphicsmagick.org" />
  <input type="hidden" name="sitesearch" value="www.graphicsmagick.org" />
<span class="nowrap"><input type="text" name="q" size="25" maxlength="255" />&nbsp;<input type="submit" name="sa" value="Search" /></span>
</form>
</div>


<div class="navmenu">
<ul>
  <li><a href="../index.html">Home</a></li>
  <li><a href="../project.html">Project</a></li>
  <li><a href="../download.html">Download</a></li>
  <li><a href="../README.html">Install</a></li>
  <li><a href="../Hg.html">Source</a></li>
  <li><a href="../NEWS.html">News</a> </li>
  <li><a href="../utilities.html">Utilities</a></li>
  <li><a href="../programming.html">Programming</a></li>
  <li><a href="../reference.html">Reference</a></li>
</ul>
</div>

<main id="signature">
<h1 class="title">signature</h1>
<p class="subtitle" id="add-a-digital-signature-to-the-image">Add a digital signature to the image</p>
<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#finalizesignature" id="id9">FinalizeSignature</a></p></li>
<li><p><a class="reference internal" href="#getsignatureinfo" id="id10">GetSignatureInfo</a></p></li>
<li><p><a class="reference internal" href="#signatureimage" id="id11">SignatureImage</a></p></li>
<li><p><a class="reference internal" href="#transformsignature" id="id12">TransformSignature</a></p></li>
<li><p><a class="reference internal" href="#updatesignature" id="id13">UpdateSignature</a></p></li>
</ul>
</div>
<section id="finalizesignature">
<h1><a class="toc-backref" href="#id9">FinalizeSignature</a></h1>
<section id="synopsis">
<h2>Synopsis</h2>
<pre class="literal-block">FinalizeSignature( <a class="reference external" href="../api/types.html#signatureinfo">SignatureInfo</a> *signature_info );</pre>
</section>
<section id="description">
<h2>Description</h2>
<p>Method FinalizeSignature finalizes the SHA message digest computation.</p>
<p>The format of the FinalizeSignature method is:</p>
<pre class="literal-block">FinalizeSignature( <a class="reference external" href="../api/types.html#signatureinfo">SignatureInfo</a> *signature_info );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>signature_info:</dt>
<dd><p>The address of a structure of type SignatureInfo.</p>
</dd>
</dl>
</section>
</section>
<section id="getsignatureinfo">
<h1><a class="toc-backref" href="#id10">GetSignatureInfo</a></h1>
<section id="id1">
<h2>Synopsis</h2>
<pre class="literal-block">GetSignatureInfo( <a class="reference external" href="../api/types.html#signatureinfo">SignatureInfo</a> *signature_info );</pre>
</section>
<section id="id2">
<h2>Description</h2>
<p>Method GetSignatureInfo initializes the SHA message digest structure.</p>
<p>The format of the GetSignatureInfo method is:</p>
<pre class="literal-block">GetSignatureInfo( <a class="reference external" href="../api/types.html#signatureinfo">SignatureInfo</a> *signature_info );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>signature_info:</dt>
<dd><p>The address of a structure of type SignatureInfo.</p>
</dd>
</dl>
</section>
</section>
<section id="signatureimage">
<h1><a class="toc-backref" href="#id11">SignatureImage</a></h1>
<section id="id3">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int SignatureImage( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
</section>
<section id="id4">
<h2>Description</h2>
<p>SignatureImage() computes a message digest from an image pixel stream with
an implementation of the NIST SHA-256 Message Digest algorithm.  This
signature uniquely identifies the image and is convenient for determining
if an image has been modified or whether two images are identical.</p>
<p>The format of the SignatureImage method is:</p>
<pre class="literal-block">unsigned int SignatureImage( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
</dl>
</section>
</section>
<section id="transformsignature">
<h1><a class="toc-backref" href="#id12">TransformSignature</a></h1>
<section id="id5">
<h2>Synopsis</h2>
<pre class="literal-block">TransformSignature( <a class="reference external" href="../api/types.html#signatureinfo">SignatureInfo</a> *signature_info );</pre>
</section>
<section id="id6">
<h2>Description</h2>
<p>TransformSignature() transforms the SHA message digest.</p>
<p>The format of the TransformSignature method is:</p>
<pre class="literal-block">TransformSignature( <a class="reference external" href="../api/types.html#signatureinfo">SignatureInfo</a> *signature_info );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>signature_info:</dt>
<dd><p>The address of a structure of type SignatureInfo.</p>
</dd>
</dl>
</section>
</section>
<section id="updatesignature">
<h1><a class="toc-backref" href="#id13">UpdateSignature</a></h1>
<section id="id7">
<h2>Synopsis</h2>
<pre class="literal-block">UpdateSignature( <a class="reference external" href="../api/types.html#signatureinfo">SignatureInfo</a> *signature_info, const unsigned char *message,
                 const size_t length );</pre>
</section>
<section id="id8">
<h2>Description</h2>
<p>UpdateSignature() updates the SHA message digest.</p>
<p>The format of the UpdateSignature method is:</p>
<pre class="literal-block">UpdateSignature( <a class="reference external" href="../api/types.html#signatureinfo">SignatureInfo</a> *signature_info, const unsigned char *message,
                 const size_t length );</pre>
<dl class="simple">
<dt>signature_info:</dt>
<dd><p>The address of a structure of type SignatureInfo.</p>
</dd>
<dt>message:</dt>
<dd><p>the message</p>
</dd>
<dt>length:</dt>
<dd><p>The length of the message.</p>
</dd>
</dl>
</section>
</section>
</main>


<hr class="docutils">
<div class="document">
    <p><a href="../Copyright.html">Copyright</a> © GraphicsMagick Group 2002-2025<!--SPONSOR_LOGO--></p>
</div>

</main>
</body>
</html>
